#!/bin/bash
echo "hyadmin go build"
go mod tidy
go build -o hy-admin main.go
chmod +x ./hy-admin
echo "kill hy-admin service"
killall hy-admin # kill hy-admin service
nohup ./hy-admin server -c=config/settings.yml >> access.log 2>&1 & #后台启动服务将日志写入access.log文件
echo "run hy-admin success"
ps -aux | grep hy-admin
